import { Component } from '@angular/core';
import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
import { NzInputModule } from 'ng-zorro-antd/input';

@Component({
  selector: 'app-input-textarea-length',
  standalone: true,
  imports: [NzInputModule, ReactiveFormsModule],
  template: `
    <div class="demo">
      <nz-textarea-count nzMaxCharacterCount="100">
        <textarea nz-input [formControl]="comment"></textarea>
      </nz-textarea-count>
    </div>
  `,
  styles: ``,
})
export class InputTextareaLengthComponent {
  comment = new FormControl('', [Validators.maxLength(100)]);
}
